<!--
  ~ Copyright (C) 2010 Brockmann Consult GmbH (info@brockmann-consult.de)
  ~
  ~ This program is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU General Public License as published by the Free
  ~ Software Foundation; either version 3 of the License, or (at your option)
  ~ any later version.
  ~ This program is distributed in the hope that it will be useful, but WITHOUT
  ~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  ~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  ~ more details.
  ~
  ~ You should have received a copy of the GNU General Public License along
  ~ with this program; if not, see http://www.gnu.org/licenses/
  -->

<html>
<head>
    <title>Sentinel Toolbox Help - Orthorectification Algorithm</title>
    <link rel="stylesheet" href="../style.css">
</head>

<body>
<table class="header">
    <tr class="header">
        <td class="header">&nbsp;
            Orthorectification Algorithm
        </td>

        <td class="header" align="right"><a href="../general/overview/SnapOverview.html"><img src="../images/snap_header.jpg"
                                                                                     border=0></a></td>
    </tr>
</table>

<h3>Orthorectification Algorithm</h3>
<h4>Introduction</h4>

<p>Orthorectified images are geodetic corrected with respect to the acquisition conditions such as viewing geometry,
    platform attitude, Earth rotation and of the relief effects (parallax). Such corrected images are perfectly
    superimposable
    whatever being their acquisition dates and viewing direction.
    Normally, the geo-location of Level 1B and Level 2 data products is based on the intersection of viewing direction
    and the WGS-84 earth ellipsoid. The orthorectification algorithm in SNAP corrects the geo-location with respect to
    a specified elevation model with sufficient accuracy.</p>

<p>
    Equations and algorithms provided in this page are extracted from the "Envisat MERIS Geometry Handbook" written by
    Serge RIAZANOFF, Director of VisioTerra and Professor at the University of Marne-la-Vall&eacute;e (France).<br>
    For more information, please check 
    <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">     
        <param name="content" value="http://www.visioterra.com">
        <param name="text" value="<html><u>www.visioterra.com</u></html>">
    </object> and
    <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">     
        <param name="content" value="http://www-igm.univ-mlv.fr/~riazano/">
        <param name="text" value="<html><u>http://www-igm.univ-mlv.fr/~riazano/</u></html>">
    </object> (folder "Publications").
</p>

<p>The following figure demonstrates the preconditions which are expected by the orthorectification as
    implemented in SNAP:</p>

<p align="center"><img src="images/Orthorectification_fig004.jpg" width="600" height="281" border=0><br>
    Preconditions for orthorectification
</p>


<p>
    The geodetic point P<sub>0</sub> is the geo-location as provided by a Level 1B or Level 2 data product. The geodetic
    point P<sub>1</sub> is the actual position of the measurement. The orthorectification is actually a map projection
    in
    which each pixel in the output product clearly identifies P<sub>1</sub>. A simple map projection tries to find
    find the pixel corresponding to P<sub>0</sub> in a given input product. The orthorectification tries to find the
    pixel corresponding to P<sub>1</sub> in a given input product.
    The approximation of the Earth geoid as used in the orthorectification algorithm can be provided by MERIS/AATSR
    tie-point
    elevations or a supported DEM. Currently, only the <a href="GETASSE30ElevationModel.html">GETASSE30 elevation
    model</a>
    can be used.<br>
</p>

<p></p>
<h4>Prediction/Correction Algorithm</h4>

<p>The prediction/correction algorithm ensures that both, the direct location model and the inverse location model
    have the same accuracy.
<ul>

    <li>The <b>direct location model</b> <img src="images/Orthorectification_eq002.jpg" width="60" height="23" border=0
                                              align="middle">
        enables to perform computation of coordinates in the earth reference system
        associated to the geo-coded image.
    </li>

    <li>The <b>inverse location model</b> <img src="images/Orthorectification_eq003.jpg" width="74" height="24" border=0
                                               align="middle">
        enables computation of coordinates in the input product reference system.
    </li>
</ul>

<p>
    In most of the cases the direct location model is issued from a viewing model given by analytical
    functions and providing accurate results, while the inverse location model is only a predictor, for example
    estimated by a polynomial function.
</p>

<p> Scope of the prediction/correction algorithm is to retrieve the pixel (l,p)
    that match the <img
            src="images/Orthorectification_eq004.jpg" width="40" height="18" border=0 align="middle">
    by the direct location model: f(l,p) = <img src="images/Orthorectification_eq004.jpg" width="40" height="18"
                                                border=0 align="middle">.<br>
    Principle is to sum a series of always-smaller corrections vectors, each one being estimated by a go and
    return from/to the MERIS segment to/from the geocoded image. The refinement loop is stopped when the
    (l<sub>i</sub>,p<sub>i</sub>) is close enough the first point (l<sub>0</sub>,p<sub>0</sub>) according to a
    predefined tolerance.<br>
    Following figure illustrates the prediction/correction principle on two iterations.

<p align="center"><img src="images/Orthorectification_fig003.jpg" width="500" height="360" border=0>
</p>
The prediction/correction algorithm is given in the figure below:

<p align="center"><img src="images/Orthorectification_fig002.jpg" width="487" height="477" border=0>
</p>

<h4>Direct Location Model</h4>

<p> The direct location f compute the geodetic coordinates (l,j) from the MERIS
    segment coordinates (l,p) and the altitude h. The provided geodetic coordinates
    are corrected of the parallax bias taking into account the viewing angle <img
            src="images/Orthorectification_eq010.jpg" width="44" height="21" border=0 align="middle">
    and the altitude h. </p>
<h5>Retrieving Tie-Point Facet</h5>

<p>
    Coordinates (F,J) of the upper-left tie-point of the facet containing the point (l,p) may simply be obtained
    dividing l and p by the number DF of frames between two consecutive tie-points and the number DJ of
    columns between tie-points respectively.

<p align="center"><img src="images/Orthorectification_eq005.jpg" width="113" height="78" border=0><br>
    <img src="images/Orthorectification_eq006.jpg" width="117" height="54" border=0>
</p>
<h5>Geodetic Coordinates Interpolation</h5>

<p>
    The standard bi-linear interpolation is applied to the longitude and latitude of the tie-points.

<p align="center"><img src="images/Orthorectification_eq007.jpg" width="439" height="155" border=0>
</p>
<h5>Viewing Angle Interpolation</h5>

<p>
    The standard bi-linear interpolation is applied to the viewing zenith and viewing azimuth of the
    tie-points.

<p align="center"><img src="images/Orthorectification_eq008.jpg" width="428" height="159" border=0>
</p>
<h5>Compute and Apply the Geodetic Correction</h5>

<p>
    The geodetic correction formula applied to the tie-points are applied to the (l,p) point.

<p align="center"><img src="images/Orthorectification_eq009.jpg" width="279" height="168" border=0>
</p>

<h4>Parallax Estimate at Tie-Points</h4>

<p>
    The parallax is estimated by knowing the altitude and viewing angle at any point of
    the product grid. In particular, the geodetic correction terms (dlat,dlon) are said being computed by the
    formula below and stored in the Tie Points ADSR.

<p align="center"><img src="images/Orthorectification_eq001.jpg" width="650" height="200" border=0>
</p>
The drawing below demonstrates the parallax estimation graphically:
<p align="center"><img src="images/Orthorectification_fig001.jpg" width="371" height="354" border=0>
</p>

<h4>Orthorectification by Example</h4>

<p>To demonstrate the orthorectification two subsets from two products showing the same scene but from different viewing
    angles were taken and laid over each other.
</p>
<ul>
    <li>Product1: radiance_15 and view angle<br>
        <p align="center"><img src="images/Orthorectification_ex002.jpg" width="648" height="361" border=0>
        </p>
    </li>
    <li>Product2: radiance_15 and view angle<br>
        <p align="center"><img src="images/Orthorectification_ex003.jpg" width="648" height="361" border=0>
        </p>
    </li>
</ul>

<p>At a zoom ratio of 200% you can see the differences between both scenes.
    The unorthorectified scenes are heavily blurred but the orthorectified ones are clear.
<ul>
    <li>Without orthorectification<br>
        <p align="center"><img src="images/Orthorectification_ex004.jpg" width="603" height="271" border=0>
        </p>
    </li>
    <li>With orthorectification<br>
        <p align="center"><img src="images/Orthorectification_ex005.jpg" width="603" height="271" border=0>
        </p>
    </li>
</ul>
<hr>
</body>
</html>